//
//  license-manager-for-test.h
//  License++ Tests
//
//  Copyright © 2018-present Amrayn Web Services
//  https://amrayn.com
//
//  See https://github.com/amrayn/licensepp/blob/master/LICENSE 
//

#ifndef LICENSE_MANAGER_FOR_TEST_H
#define LICENSE_MANAGER_FOR_TEST_H

#include "test.h"
#include <license++/base-license-manager.h>
#include <license++/issuing-authority.h>

using namespace licensepp;

class LicenseManagerKeyRegister
{
public:
    static const unsigned char LICENSE_MANAGER_SIGNATURE_KEY[];

    static const std::vector<IssuingAuthority> LICENSE_ISSUING_AUTHORITIES;
};

const unsigned char LicenseManagerKeyRegister::LICENSE_MANAGER_SIGNATURE_KEY[] =
{
    0x82, 0xF3, 0x6C, 0x25, 0xA9, 0x12, 0x38, 0x9A, 0xBF, 0xF8, 0x09, 0x1C, 0x75, 0x93, 0x03, 0xD2
};

const std::vector<IssuingAuthority> LicenseManagerKeyRegister::LICENSE_ISSUING_AUTHORITIES = {
    IssuingAuthority("unittest-issuer-1", "Amrayn Web Services (development)", "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDV3dJQkFBS0JnUUMrTU9RbGhUUlhRTXRuK1JpdjNwVWNWdmdZdkpiWG5SeHdSL24xcTFPR1llUWlEdVY4CmlOOVcyQlVDQWVjVE1CVEJMK0xZSndpMnErWEVWclZZZjF6NTVPRWpicmJyK3hRQitJYU5uNTIzWUpRRGdQd1IKU0ROMnp5dzhmSDRBUVVENjk3VnRYamJaVXFaL1ZOZU1iaFJoRnhJV2lkMDVIVkE1THM5bkdFMllNd0lCRVFLQgpnRTVRWGZGVTkyODR6RG5mQ2lwTWw4QmdDODN6VFN1YkM3WERTTTZSMXhrM1hlL29CQ1E0Vy9hVk5kT21ialVUCnpFK01NRHJpNVhoazVpT3JPNXpwSmtnUjJpVGszb2xJK1YvUVNacXBnZ2xBRnJ5aVMzVW1IMTlLVmVKdERaTmgKK2ZtU21WL0Y0T0xhNTFIVTY5eEYzZUdTRmlMVnNiY2ZMUVht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GMvcjdOUVM1Y0RzaW95aXp0T281Y3puNTRxdTFzajlLbVEKd0xNS0trVy8wcjFEazk4Z0lRSUJFUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=", 25U, true), // 25 hours - secret: unit-test-issuer-secret
    IssuingAuthority("sample-license-authority", "Amrayn Web Services (dev)", "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb1FJQkFBS0NBUUVBdHhnSlBDVklIUGp4VmpnMDVlMnVaNURqNDN    IdDF0WFlUK3VkVVRTL3RrSlgyQzltCnFoOGpLUHVPZkF1enFiUCtlenJBdENIQ3ptRE5sZkUwamVOU1VUZlFWbFhxNzd3UGh6ajZWNm1lWTNlcmYxK0oKVGNHUTk1Q0U3QWxRZmlvTm1aMU1OOTBSOXo2QllJMFJpVHh1QVFXckZqdm1r    MUsrZ1RRN2dPbVV1WEx1MzJ2RwppNVE0cElKVHBJMExYQkp5QnJVNEs1ZTdWTVhaMHQrb1dRc3djcm05bkJYWVpleVRJcUZ2VmVkbEpxZTArTm9GCk8zeE91VHYxSiticWtWeFFuQlczQ2dyR2tjT0ZWRWtEQ0ROOEZoZ0N5SEpJRDliZ    kdsNlBJUEp0TE94UlF2M20KSituaktNcnF5a3BPaWp6WXNyUjRSWXlEV0w2dm1hMlpSZGlZS1FJQkVRS0NBUUFKYklnQk5wL3licklSblQ3MQpQdzZmcnZ5cnRPdzk0WmhQYUZ6TmwydS8rQjdmMVVObTM3aGwzOFZ6ajZrL1VxMFpLbz    J1NnlaREY4NVlxS1o0ClBvWWVpSVVUZ0toVDNtS3VmVWtlM1crdWlBcTFuV05OYWZhRk5uOVA2ZVFrbklSMjl5ZXdEVUxPbTdBU0pXRG4KRUVsdE9xVUtqbUNTNEg2QzRyQTlPVEx5OU9NcVpUbU1BZEFTUFZsRGNtNWVkdWVCSGtDeXd    rV1lwb2M5N1o2bQpwZG1hOEFOdkcyMUFJOGFZTThTRzgrTmVPZE1pK2tVdmJYT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tTHlPTXhiQjREbmZwUDdQWm5YSXNkNlU2ClpZRUNnWUJzNWlPQlBWaW4waThVWFhHU09xSjIxOHpmUTZUVmdTYk1TaDErZlFyRkY4TlZRR3g1bkxrcUhXZGkKQXRORDhOYW    Z2cFdyT2NQNlpNWksxa29JUXJpa1RWNmd4UStJQXVZSXd6R0tTRVNFR3RyM0JMRVdWRnR2OGpHNgp1d2RJejFTdDFpamRhd3J1VldNNFI1eXJaRVJsb1EyWFFXcGZUbVNibUQ4Y1RUNjNrZz09Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEt    FWS0tLS0tCg==:LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklEQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FRMEFNSUlCQ0FLQ0FRRUF0eGdKUENWSUhQanhWamcwNWUydQpaNURqNDNIdDF0WFlUK3VkVVRTL3RrSlgyQzltcWg    4aktQdU9mQXV6cWJQK2V6ckF0Q0hDem1ETmxmRTBqZU5TClVUZlFWbFhxNzd3UGh6ajZWNm1lWTNlcmYxK0pUY0dROTVDRTdBbFFmaW9ObVoxTU45MFI5ejZCWUkwUmlUeHUKQVFXckZqdm1rMUsrZ1RRN2dPbVV1WEx1MzJ2R2k1UTRw    SUpUcEkwTFhCSnlCclU0SzVlN1ZNWFowdCtvV1Fzdwpjcm05bkJYWVpleVRJcUZ2VmVkbEpxZTArTm9GTzN4T3VUdjFKK2Jxa1Z4UW5CVzNDZ3JHa2NPRlZFa0RDRE44CkZoZ0N5SEpJRDliZkdsNlBJUEp0TE94UlF2M21KK25qS01yc    XlrcE9panpZc3JSNFJZeURXTDZ2bWEyWlJkaVkKS1FJQkVRPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==", 87600U, true),
};

class LicenseManagerForTest : public BaseLicenseManager<LicenseManagerKeyRegister>
{
public:
    LicenseManagerForTest()
        : BaseLicenseManager()
    {
    }
};

#endif // LICENSE_MANAGER_FOR_TEST_H
